@{
	var grid = Html.DevExpress().GridView(settings => {
        settings.Name = "GridView1test";
        settings.CallbackRouteValues = new { Controller = "Home", Action = "GridView1Partialtest" };

				settings.SettingsEditing.AddNewRowRouteValues = new { Controller = "Home", Action = "GridView1PartialtestAddNew" };
        settings.SettingsEditing.UpdateRowRouteValues = new { Controller = "Home", Action = "GridView1PartialtestUpdate" };
        settings.SettingsEditing.DeleteRowRouteValues = new { Controller = "Home", Action = "GridView1PartialtestDelete" };
        settings.SettingsEditing.Mode = GridViewEditingMode.EditFormAndDisplayRow;
        settings.SettingsBehavior.ConfirmDelete = true;

		settings.CommandColumn.Visible = true;
        settings.CommandColumn.ShowNewButton = true;
        settings.CommandColumn.ShowDeleteButton = true;
        settings.CommandColumn.ShowEditButton = true;

		settings.KeyFieldName = "UserName";

		settings.SettingsPager.Visible = true;
		settings.Settings.ShowGroupPanel = true;
		settings.Settings.ShowFilterRow = true;
		settings.SettingsBehavior.AllowSelectByRowClick = true;

		settings.SettingsAdaptivity.AdaptivityMode = GridViewAdaptivityMode.Off;
		settings.SettingsAdaptivity.AdaptiveColumnPosition = GridViewAdaptiveColumnPosition.Right;
		settings.SettingsAdaptivity.AdaptiveDetailColumnCount = 1;
		settings.SettingsAdaptivity.AllowOnlyOneAdaptiveDetailExpanded = false;
		settings.SettingsAdaptivity.HideDataCellsAtWindowInnerWidth = 0;

				settings.Columns.Add("UserName");
				settings.Columns.Add("Password");
				settings.Columns.Add("RememberMe");
			});
		if (ViewData["EditError"] != null){
        grid.SetEditErrorText((string)ViewData["EditError"]);
    }
}
@grid.Bind(Model).GetHtml()